package com.ean.backpack.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.ean.backpack.domain.Gdsattributelist;
import com.ean.backpack.repository.GdsattributelistRepository;
import com.ean.backpack.service.GdsattributelistService;

@Service
@Transactional
public class GdsattributelistServiceImpl implements GdsattributelistService {

	@Autowired
	GdsattributelistRepository gdsattributelistRepository;

	public long countAllGdsattributelists() {
		return gdsattributelistRepository.count();
	}

	public void deleteGdsattributelist(Gdsattributelist gdsattributelist) {
		gdsattributelistRepository.delete(gdsattributelist);
	}

	public Gdsattributelist findGdsattributelist(Integer id) {
		return gdsattributelistRepository.findOne(id);
	}

	public List<Gdsattributelist> findAllGdsattributelists() {
		return gdsattributelistRepository.findAll();
	}

	public List<Gdsattributelist> findGdsattributelistEntries(int firstResult,
			int maxResults) {
		return gdsattributelistRepository.findAll(
				new org.springframework.data.domain.PageRequest(firstResult
						/ maxResults, maxResults)).getContent();
	}

	public void saveGdsattributelist(Gdsattributelist gdsattributelist) {
		gdsattributelistRepository.save(gdsattributelist);
	}

	public Gdsattributelist updateGdsattributelist(
			Gdsattributelist gdsattributelist) {
		return gdsattributelistRepository.save(gdsattributelist);
	}
}
